Intersoft WebInput Documentation
How-to: Programmatically set, get and clear WebInput value in client side
See Also Send Feedback
Intersoft WebInput > Features and Concepts > Value and Text - Displaying, Validating and Updating Values > How-to: Programmatically set, get and clear WebInput value in client side

Glossary Item Box

You can set, get and clear WebInput value programmatically in client-side.

In this topic, you will learn how to use the method for set, get and clear the WebInput's value.

To set WebInput value

  1. Place the following code to set WebInput's value:

    JavaScript Copy ImageCopy Code
    function SetDateTimeFreeInput()
    {
       var wiDateTimeFreeInput = ISGetObject("wiDateTimeFreeInput");
       wiDateTimeFreeInput.SetValueData("01-January-2007");
    }
    

  2. Run the Project.

To get WebInput value

  1. Place the following code to get/retrieve WebInput's value:

    JavaScript Copy ImageCopy Code
    function GetDateTimeFreeInput()
    {
       var wiDateTimeFreeInput = ISGetObject("wiDateTimeFreeInput");
       alert(wiDateTimeFreeInput.GetValueData());
    }
    

  2. Run the Project.

To clear WebInput value

  1. Place the following code to clear WebInput's value:

    JavaScript Copy ImageCopy Code
    function ClearDateTimeFreeInput()
    {
       var wiDateTimeFreeInput = ISGetObject("wiDateTimeFreeInput");
       wiDateTimeFreeInput.SetValueData("");
    }                      
    

  2. Run the Project.

See Also